package com.smartHome.controller;

import com.smartHome.pojo.dto.SceneDeviceStatusDTO;
import com.smartHome.pojo.entity.Result;
import com.smartHome.pojo.entity.SceneDevice;
import com.smartHome.service.SceneDeviceService;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/sceneDevice")
public class SceneDeviceController {

    private final SceneDeviceService sceneDeviceService;

    public SceneDeviceController(SceneDeviceService sceneDeviceService) {
        this.sceneDeviceService = sceneDeviceService;
    }

    @PostMapping("/batchUpdateStatus")
    public Result batchUpdateStatus(@RequestBody List<SceneDevice> statusList) {
        sceneDeviceService.batchUpdateStatus(statusList);
        return Result.success();
    }


} 